package com.moliku.insurance.process.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.moliku.insurance.model.entity.Order;
import com.moliku.insurance.model.entity.OrderDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author 七分
 * @version 1.0
 * @date 2021/3/1 11:10
 */
@Mapper
public interface BaseOrderMapper extends BaseMapper<Order> {

    String selectByCompanyCode(String code);

    Order selectByPolicyNo(String policyNo);

    Order selectByPolicyNoAndCompany(@Param("policyNo") String policyNo, @Param("company") String company);

    OrderDetail selectDeatailByOrderId(@Param("orderId") Long orderId);

    int updateOrderDeatailByOrderId(OrderDetail entity);
}
